/*
 * Copyright [vega-ai-sdk] [rightbrain.art]
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * According to vega feature, we modify some class，comment, field name, etc.
 */

package com.rightbrain.vegaai.tool.sdk.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * VegaConfig.
 */
@Slf4j
@Configuration
public class VegaConfig {

    @Value("${vega.appKey}")
    private String appKey;//ak

    @Value("${vega.appSecret}")
    private String appSecret;//sk

    @Value("${vega.openId}")
    private String openId;//openId

    @Value("${vega.url}")
    private String url;//url

    public VegaConfig vegaConfig(){
        VegaConfig vegaConfig = new VegaConfig();
        vegaConfig.setAppKey(appKey);
        vegaConfig.setAppSecret(appSecret);
        vegaConfig.setOpenId(openId);
        log.info("init vega config for app : {} which openId is : {}", appKey, openId);
        return vegaConfig;
    }
    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
        this.appKey = appKey;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public void setAppSecret(String appSecret) {
        this.appSecret = appSecret;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
}
